export default defineNuxtRouteMiddleware((to, from) => {
    const {loginStatus} = useStores.user();
    const {getToken} = useUtils().AuthUtils;
    if (!getToken() || !loginStatus) {
        // 未登录，跳转到登录页
        return navigateTo({
            path: '/login',
            query: {
                redirect: to.fullPath,
                message: encodeURI("您暂未登录，请登陆后再试"),
            }
        }, {
            redirectCode: 302,
        });
    }
});